@import "~scss/variables";

.sw-cms-list-item {
    display: grid;
    grid-template-rows: 120px 40px;
    padding: 10px 10px 0;
    background: $color-white;
    border: 1px solid $color-gray-300;
    border-radius: 4px;
    position: relative;

    &:hover {
        border-color: $color-shopware-brand-500;
        box-shadow: 0 0 4px 0 rgba($color-shopware-brand-500, 0.4);
        cursor: pointer;

        .sw-cms-list-item__options {
            visibility: visible;
        }
    }

    &.is--disabled {
        background-color: $color-gray-100;

        &:hover {
            cursor: not-allowed;
            border-color: $color-gray-300;
        }
    }

    .sw-cms-list-item__image {
        background: center center no-repeat $color-white url("");
        background-size: 90% 90%;
        border: 1px solid $color-gray-300;
        border-radius: 4px;
        height: 120px;

        &.is--empty {
            background: unset;
            color: $color-gray-500;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: $font-size-xs;
        }
    }

    .sw-cms-list-item__is-default {
        position: absolute;
        bottom: 45px;
        left: 15px;
        font-weight: $font-weight-semi-bold;
        font-size: $font-size-xxs;
        line-height: 16px;
        color: $color-white;
        padding: 4px 8px;
        background: $color-gray-500;
        border-radius: 4px;
    }

    .sw-cms-list-item__info {
        display: grid;
        grid-template-columns: 8px 1fr 18px;
        grid-column-gap: 10px;
        align-items: center;
        align-content: center;
    }

    .sw-cms-list-item__locked {
        color: $color-gray-300;
    }

    .sw-cms-list-item__status {
        width: 8px;
        height: 8px;
        border-radius: 100%;
        margin-top: 1px;
        background: $color-gray-300;

        &.is--active {
            background: $color-module-green-900;
        }
    }

    .sw-cms-list-item__title {
        color: $color-darkgray-200;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        font-size: $font-size-xs;
    }

    .sw-cms-list-item__options {
        visibility: hidden;
        position: absolute;
        right: 16px;
        top: 16px;

        .sw-context-button__button {
            height: 16px;
            padding: 0 2px;
            line-height: 13px;
            background: #fff;
            border: 1px solid #d8dde6;
            border-radius: 4px;

            &:hover,
            &.is--active {
                background-color: #fff;
            }

            &.is--active {
                visibility: visible;
            }

            .mt-icon {
                height: 100%;
            }
        }
    }
}
